(31337_78199387512682, `Conventionally, we display data in increasing memory addresses left to right. This ensures ASCII text also appears left to right when storing characters in increasing order.


[box]          Memory (hex) |   ASCII
Address: 0  1  2  3  4 | 0 1 2 3 4
Data:   [color=#ff6680]48[/color] [color=#ffe666]65[/color] [color=#66ff99]6C[/color] [color=#66ccff]6C[/color] [color=#9966ff]6F[/color] | [color=#ff6680]H[/color] [color=#ffe666]e[/color] [color=#66ff99]l[/color] [color=#66ccff]l[/color] [color=#9966ff]o[/color]
[/color][/box]

Further, the convention for writing numbers is that the most significant digits are on the left, such that thirteen is written [color=#ff6680]13[/color] instead of [color=#ff6680]31[/color].

Given this, the obvious way to represent a multi byte number such as 0x[color=#66ccff]12[/color][color=#66ff99]34[/color][color=#ffe666]56[/color][color=#ff6680]78[/color] in memory is:

[box]          Memory (hex)
Address:   0  1  2  3
Data:     [color=#66ccff]12[/color] [color=#66ff99]34[/color] [color=#ffe666]56[/color] [color=#ff6680]78[/color][/box]

This is called [b]Big Endian[/b], because bigger (more significant) digits are stored at lower address. 

However, having numbers grow in the opposite direction of text is awkward algorithmically speaking. Some applications, like cryptography, needs unbounded numbers (BigInt), and to achieve this you need to be able to extend the number of digits or remove trailing zeroes. It is natural to order the digits such that you can grow the number without having to update the pointer that points to the number. You could of course decide that growing means going in the opposite direction, in which case you will have the same issue when appending to text (or implement two kinds of growing arrays). 

There are other aspects of storing numbers least significant bits first that turn out to be beneficial. For example it is much more common to only need the lower bits (down casting) of a number than only needing the high bits. Storing numbers least significant digit first again means that this can be done without changing the pointer.

The computationally natural convention of storing least significant digits first is called [b]Little Endian[/b]. Unfortunately viewing little endian is generally made even more confusing because values are grouped by bytes, which are each displayed in the conventional direction. Therefore 0x[color=#66ccff]12[/color][color=#66ff99]34[/color][color=#ffe666]56[/color][color=#ff6680]78[/color] becomes:

[box]          Memory (hex)
Address:   0  1  2  3
Data:     [color=#ff6680]78[/color] [color=#ffe666]56[/color] [color=#66ff99]34[/color] [color=#66ccff]12[/color][/box]

Had the convention been to write numbers and text such that they grow in the same direction, there wouldn't be a need for this manual page.

Today modern CPUs all use little endian and it is has generally become the standard, with the notable exception of TCP/IP which uses big endian.
`)